<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/6/3 0003
 * Time: 15:09
 */

//統一資源路由
use think\facade\Route;

//绑定手机号
Route::resource('api/:version/member_mobile','api/:version.member.mobile')
    ->middleware(\app\api\middleware\MemberAuth::class,'compatible');
Route::resource('api/:version/member_:controller','api/:version.member.:controller')
    ->middleware(\app\api\middleware\MemberAuth::class);

//获取订单支付参数
Route::rule('api/:version/member_order/pay','api/:version.member.order/pay','post')
    ->middleware(\app\api\middleware\MemberAuth::class);
//取消订单
Route::rule('api/:version/member_order/:id/cancel','api/:version.member.order/cancel','get')
    ->middleware(\app\api\middleware\MemberAuth::class);


Route::resource('api/:version/cleaner_mobile','api/:version.cleaner.mobile')
    ->middleware(\app\api\middleware\CleanerAuth::class,'compatible');
Route::resource('api/:version/cleaner_:controller','api/:version.cleaner.:controller')
    ->middleware(\app\api\middleware\CleanerAuth::class);

Route::resource('api/:version/agent_mobile','api/:version.agent.mobile')
    ->middleware(\app\api\middleware\AgentAuth::class,'compatible');
Route::resource('api/:version/agent_:controller','api/:version.agent.:controller')
    ->middleware(\app\api\middleware\AgentAuth::class);

Route::rule('api/:version/wx_notify/:id','api/:version.WxNotify/read','POST');

Route::resource('api/:version/:controller', 'api/:version.:controller');
return [];